﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxEditors;

public partial class admin_giamgiave : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        load();
    }
    private void load()
    {
        ASPxGridView1.DataSource = Ve.GetDataLoaiGhe();
        ASPxGridView1.DataBind();
    }
    protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
    {
        ASPxTextBox maloaighe = (ASPxTextBox)ASPxGridView1.FindEditFormTemplateControl("ASPxTextBox1");
        ASPxTextBox phantram = (ASPxTextBox)ASPxGridView1.FindEditFormTemplateControl("ASPxTextBox4");
        Ve.GiamGiaVe(int.Parse(phantram.Text), maloaighe.Text);
        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        load();
    }
}